//构造函数模式是一种创建对象的方式，它通过构造函数来定义对象的属性和方法。下面是一个构造函数模式的案例：
 
function Person(name, age, gender) {
  this.name = name;
  this.age = age;
  this.gender = gender;
  
  this.sayHello = function() {
    console.log("Hello, my name is " + this.name);
  }
}

var person1 = new Person("John", 25, "male");
person1.sayHello(); // 输出：Hello, my name is John